package org.speedmall.core.service;

import org.speedmall.core.entity.Product;
import org.speedmall.storage.api.bo.ProductDecreaseBO;
import org.speedmall.storage.api.bo.ProductIncreaseBO;
import org.springframework.stereotype.Service;

/**
 * @author hujiaguo
 * @Package org.speedmall.core.service
 * @date 2024/4/25 18:16:36
 */
@Service
public interface ProductService {
    /**
     * 增加库存
     * @param increaseBO
     */
    void increaseStorage(ProductIncreaseBO increaseBO);

    /**
     * 减少库存
     * @param decreaseBO
     */
    void decreaseStorage(ProductDecreaseBO decreaseBO);

    /**
     * 通过id查找产品
     * @param id
     * @return
     */
    Product findById(Long id);

    /**
     * 通过属性查找产品
     * @param product 产品实体
     * @return
     */
    Product findByParma(Product product);
}
